package test06;

import java.util.Objects;

public class Student {
    private String id;
    private String name;
    private double chinese;
    private double math;
    private double english;
    private int average;
    public Student(String id, String name, double chinese, double math, double english) {
        this.id = id;
        this.name = name;
        this.chinese = chinese;
        this.math = math;
        this.english = english;
        this.average = (int)(chinese + math + english)/3;
    }
    public Student() {
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getChinese() {
        return chinese;
    }

    public void setChinese(double chinese) {
        this.chinese = chinese;
    }

    public double getMath() {
        return math;
    }

    public void setMath(double math) {
        this.math = math;
    }

    public double getEnglish() {
        return english;
    }

    public void setEnglish(double english) {
        this.english = english;
    }

    public double getAverage() {
        return average;
    }

    public void setAverage(int average) {
        this.average = average;
    }

    @Override
    public String toString() {
        return "学号：" + id + "，姓名：" + name + "，数学：" + math
                + "，英语：" + english + "，语文：" + chinese + "，平均分：" + average;
    }
}
